package com.chucang.shucang.usr.service;

import com.chucang.shucang.common.base.page.PageData;
import com.chucang.shucang.common.base.service.CrudService;
import com.chucang.shucang.usr.dto.UserBaseDTO;
import com.chucang.shucang.usr.entity.UserBaseEntity;
import com.chucang.shucang.usr.vo.*;
import com.chucang.shucang.usr.vo.query.UserOnSaleProductQuery;
import com.chucang.shucang.usr.vo.query.UserSoldProductQuery;

import java.util.concurrent.ExecutionException;

/**
 * 用户基础信息表
 *
 * @author flitsneak flitsneak@gmail.com
 * @since 1.0.0 2022-09-12
 */
public interface UserBaseService extends CrudService<UserBaseEntity, UserBaseDTO> {

    UserBaseEntity getByInviteCode(String inviteCode);

    UserBaseEntity getByMobile(String mobile);

    PageData<UserSoldProductResVO> soldProductPage(UserSoldProductQuery userSoldProductQuery) throws ExecutionException, InterruptedException;

    PageData<UserOnSaleProductResVO> onSaleProductPage(UserOnSaleProductQuery userOnSaleProductQuery) throws ExecutionException, InterruptedException;

    boolean withdrawProductConsign(UserWithdrawProductConsignVO userWithdrawProductConsignVO);

    boolean setSecPassword(UserSetSecPasswordVO userSetSecPasswordVO);

    String checkSecPassword(UserCheckSecPasswordVO userCheckSecPasswordVO);
}